home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.cs.arizona.edu
/
ftp.cs.arizona.edu.tar
/
ftp.cs.arizona.edu
/
icon
/
newsgrp
/
group98a.txt
/
000097_icon-group-sender _Wed Mar 4 16:30:33 1998.msg
< prev
next >
Wrap
Internet Message Format
|
2000-09-20
|
3KB
Return-Path: <icon-group-sender>
Received: from kingfisher.CS.Arizona.EDU (kingfisher.CS.Arizona.EDU [192.12.69.239])
by baskerville.CS.Arizona.EDU (8.8.7/8.8.7) with SMTP id QAA18123
for <icon-group-addresses@baskerville.CS.Arizona.EDU>; Wed, 4 Mar 1998 16:30:33 -0700 (MST)
Received: by kingfisher.CS.Arizona.EDU (5.65v4.0/1.1.8.2/08Nov94-0446PM)
id AA05583; Wed, 4 Mar 1998 16:30:32 -0700
Date: Wed, 04 Mar 98 18:01:37 -0500
Message-Id: <9803042301.AA0102@valinet.com>
From: Paul Abrahams <abrahams@acm.org>
To: icon-group@optima.CS.Arizona.EDU
In-Reply-To: <swampler-9802041641.AA00091256@orpheus.gemini.edu>
Subject: Re: Icon translation
Reply-To: abrahams@acm.org
Errors-To: icon-group-errors@optima.CS.Arizona.EDU
Status: RO
Content-Length: 2394
>>>>> On Wed, 4 Mar 1998 09:41:45 -0700, swampler@noao.edu (Steve Wampler) said:
|Steve> If you carefully profile Icon programs, you may notice that
|Steve> there's a 'base cost' spread throughout the entire system. This
|Steve> is what makes it look as though Icon can't be sped up much - a
|Steve> rather high, flat cost foundation. I believe that a significant
|Steve> fraction of this base cost is due to the use of descriptors in
|Steve> the implementation. (Don't misunderstand me, I'm not knocking
|Steve> descriptors - they are a *major* factor in the flexibility and
|Steve> power of a language like Icon.)
|Steve> If you look at 'most' Icon programs, though, a human can
|Steve> determine that much of the transfer of data in the program can
|Steve> be identified and typed. This is one of the important features
|Steve> of Ken Walker's Icon-to-C optimizer, removing unneeded type
|Steve> checks. What that optimizer stops short of doing is removing
|Steve> the unneeded descriptors themselves.
|Steve> An *amazingly good* optimizer should be able to strip
|Steve> descriptors from most places (not all) in an Icon program. With
|Steve> appropriate support from the runtime system, speeds very close
|Steve> to C should be possible from an Icon compiler.
Frankly, I think one of the weaknesses of Icon is the lack of strong
typing - or what more accurately I would call "optional strong typing".
Icon already has declarations - they're just not used for data types. I
could imagine an Icon-like language that differed *only* in having
optional type declarations, with an "any" type that behaves just as Icon
variables now do. Such a language would, of course, have all the
elegant Icon syntax and control structures.
Strong typing would achieve two things: it would provide protection
against a wide class of coding errors, and it would make efficient
compilation possible without elaborate and still incomplete dataflow
analysis to determine run-time types. And were it optional, what would
be lost?
I won't claim that such a language would be Icon; only Icon is Icon.
But it's the language I'd very much like to have.
By the way, were Icon++ (or Icon--, if you prefer) to be compiled into C
(the poor man's form of compilation), I would expect that it would *not*
use the C string type because of the problems with null characters.
Paul Abrahams
abrahams@acm.org